#ifndef _ATM_H
#define _ATM_H

#include "VObject.h"

#define HORIZON_NSEG 128

enum ATMOSPHERE_TYPE {
	NO_ATMOSPHERE,
};

class AtmosphereMgr {
	friend class TileRenderMgr;
	friend class vPlanet;
public:
	AtmosphereMgr( vPlanet *_planet );
	virtual ~AtmosphereMgr() { }

	static void GlobalInit();
	static void GlobalExit();

	virtual void SaveParams()	{	}
	virtual void RenderBeforeTerrain( D3DXMATRIX *wmat, float dist_scale, bool dual ) {	}
	virtual void RenderAfterTerrain( D3DXMATRIX *wmat, float dist_scale, bool dual )	{	}
protected:

	typedef struct HVERTEX {
		D3DXVECTOR3 pos;
		D3DXCOLOR col;
		float tex;
		//32
	} HVERTEX;

	ATMOSPHERE_TYPE AtmType;//move into atmospheremgr !
	vPlanet *PLN;
	OBJHANDLE obj;
	static UINT
		Stride_HVERTEX,
		nIdx;
	static float
		COSP[HORIZON_NSEG],
		SINP[HORIZON_NSEG];
	static HVERTEX				*_VB;
	static ID3D11Buffer			*VB, *IB;
	static ID3D11InputLayout	*IL;
	static ID3D11VertexShader	*VS;
public:
	
	ATMOSPHERE_TYPE GetType() { return AtmType; }
};

#endif
